package ciyuan.Utils;

import ciyuan.Block.BlockRegistryManager;
import ciyuan.MainClass;
import net.minecraft.fluid.FlowingFluid;
import net.minecraft.fluid.Fluid;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fluids.FluidAttributes;
import net.minecraftforge.fluids.ForgeFlowingFluid;
import net.minecraftforge.fml.RegistryObject;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;

/**
 * @author 150149
 */
public class FluidRegisterManager {

    public static final ResourceLocation STILL_OIL_TEXTURE = new ResourceLocation("block/water_still");
    public static final ResourceLocation FLOWING_OIL_TEXTURE = new ResourceLocation("block/water_flow");

    public static final DeferredRegister<Fluid> FLUIDS = DeferredRegister.create(ForgeRegistries.FLUIDS, MainClass.MODID);
    public static RegistryObject<FlowingFluid> oil = FLUIDS.register("oil", () -> new ForgeFlowingFluid.Source(FluidRegisterManager.PROPERTIES));
    public static RegistryObject<FlowingFluid> oilFlowing = FLUIDS.register("oil_flowing", () -> new ForgeFlowingFluid.Flowing(FluidRegisterManager.PROPERTIES));

    public static ForgeFlowingFluid.Properties PROPERTIES = new ForgeFlowingFluid.Properties(oil, oilFlowing, FluidAttributes.builder(STILL_OIL_TEXTURE, FLOWING_OIL_TEXTURE).color(0xFF000000).density(4000).viscosity(4000)).block(BlockRegistryManager.oil).slopeFindDistance(3).explosionResistance(100F);


}
